{layout name="admin:main" /}
<div id="actionbar" class="fn-clear">
    <form id="form" action="{:url('system/admin.member/select')}" method="get">
        <input type="hidden" name="input" value="{$input}" />
        <input placeholder="请输入用户完整手机号" class="input w200" type="text" name="keyword" value="{$keyword}" />
        <input type="submit" value="搜索" class="button button-blue" />
    </form>
</div>
<table class="table">
    <thead>
        <tr>
            <th class="w40 fn-tac">#</th>
            <th class="w100">操作</th>
            <th class="w100">手机号</th>
            <th>昵称</th>
            <th class="w140">登录时间</th>
            <th class="w140">更新时间</th>
            <th class="w140">创建时间</th>
            <th class="w70 fn-tac">状态</th>
        </tr>
    </thead>
    <tbody>
        {foreach $list as $vo}
        <tr>
            <td class="fn-tac li">{$vo['id']}</td>
            <td><a href="javascript:;" class="button select" title="选择" data-id="{$vo['id']}"><i class="iconfont icon-affirm_icon"></i>选择</a></td>
            <td>{$vo.phone_id}</td>
            <td>{$vo.username}</td>
            <td>{$vo->login_time|date='Y-m-d H:i'}</td>
            <td>{$vo->create_time|date='Y-m-d H:i'}</td>
            <td>{$vo->update_time|date='Y-m-d H:i'}</td>
            <td class="fn-tac li">{if $vo.is_lock}<span class="badge bg-red">锁定</span>{else}<span class="badge">正常</span>{/if}</td>
        </tr>
        {/foreach}
    </tbody>
</table>
<div class="page">{$list|raw}</div>
<script type="text/javascript">
    Do('base', 'layer', function () {
        var index = parent.layer.getFrameIndex(window.name);
        $('.select').click(function(){
            var member_id = $(this).attr('data-id');
            parent.$("#iframe").contents().find("#{$input}").val(member_id);  
            parent.layer.close(index); 
        });
    })
</script>